package com.vogue.supplymall.shop.domain.dao.impl;

import com.vogue.supplymall.shop.domain.dao.ProductPriceDao;
import com.vogue.supplymall.shop.domain.mapper.ProductPriceMapper;
import com.vogue.supplymall.shop.domain.model.ProductPrice;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Repository;

/**
 * @Aouthor: zhangliang
 * @Date: Create in 2017-12-14
 */
@Repository("productPriceDao")
public class ProductPriceDaoImpl extends BaseDaoImpl<ProductPrice, Long> implements ProductPriceDao {
	@Resource
	private ProductPriceMapper productPriceMaper;
	
	@Override
	public List<ProductPrice> findProductPriceBySPAO(Long syscodeId, Long productId, Long attrplanId, Long oneId) {
		return productPriceMaper.findProductPriceBySPAO(syscodeId, productId, attrplanId, oneId);
	}

	@Override
	public void delProductPriceBySPAO(Long syscodeId, Long productId, Long attrplanId, Long oneId) {
		
		String sql="delete from product_price where syscodeid="+syscodeId+" and productid="+productId
					+" and attrplanid="+attrplanId+" and oneId="+oneId;
		this.delete(sql);
	}
	
}
